<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  <meta http-equiv="x-ua-compatible" content="ie=edge">
  <title>忧郁小王子-搜索结果</title>
  <!-- Font Awesome -->
  <link rel="stylesheet" href="/home/css/all.css">
  <!-- Bootstrap core CSS -->
  <link href="/home/css/bootstrap.min.css" rel="stylesheet">
  <!-- Material Design Bootstrap -->
  <link href="/home/css/mdb.min.css" rel="stylesheet">
  <!-- Your custom styles (optional) -->
  <link href="/home/css/style.min.css" rel="stylesheet">
  <!-- 新 Bootstrap 核心 CSS 文件 -->

  <!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
  <script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>

  <!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
  <script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
  <style>
    .card-text{
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        overflow: hidden;
    }

  </style>
</head>

<body>

  <!--Main Navigation-->
  <header>

    <!-- Navbar -->

    <!-- Navbar -->
{{include '../common/home_header.html'}}
  </header>
  <!--Main Navigation-->

  <!--Main layout-->
  <main class="mt-5 pt-5">
    <div class="container">

      <!--Section: Jumbotron-->
      <section  class="card wow fadeIn" style="background-image: url(/public/home/img/gradient1.jpg);height: 50px">
        <h2 style="text-align: center;height: 50px;line-height: 50px">{{message}}</h2>
        <!-- Content -->
      </section>
      <!--Section: Jumbotron-->

      <hr class="my-5">

      <!--Section: Cards-->
      <section class="text-center">
        <!--Grid row-->
        <div class="row mb-4 wow fadeIn">
          <!--Grid column-->
          {{each articles}}
          <div class="col-lg-4 col-md-12 mb-4">
            <!--Card-->
            <div class="card">
              <!--Card image-->
              <div class="view overlay">
                <img style="height: 182px" src="{{$value.cover}}" class="card-img-top"
                     alt="">
                <a href="/home/article_details?id={{@$value._id}}">
                  <div class="mask rgba-white-slight"></div>
                </a>
              </div>
              <!--Card content-->
              <div class="card-body">
                <!--Title-->
                <h4 class="card-title">{{$value.title}}</h4>
                <!--Text-->
                <p class="card-text">
                  {{@$value.content.replace(/<[^>]+>/g,'')}}
                </p>
                <a href="/home/article_details?id={{@$value._id}}" class="btn btn-primary btn-md">查看详情
                  <i class="fas fa-play ml-2"></i>
                </a>
              </div>
            </div>
          </div>
          {{/each}}
        </div>
      </section>
      <!--Section: Cards-->

    </div>
  </main>
  <!--Main layout-->

  <!--Footer-->
  {{if articles == null}}
  <footer style="position: fixed;width: 100%;bottom: 0" class="page-footer text-center font-small mdb-color darken-2 mt-4 wow fadeIn">
    <!--Call to action-->
    <div class="pt-4">
      <a class="btn btn-outline-white" href="#" role="button">关于我
        <i class="fa  fa-user-secret ml-2"></i>
      </a>
      <a class="btn btn-outline-white" href="#" role="button">
        联系我
        <i class="fa  fa-envelope-square ml-2"></i>
      </a>
    </div>
    <!--/.Call to action-->
    <hr class="my-4">
    <!--Copyright-->
    <div class="footer-copyright py-3">
      <a href="#">Copyright &copy; 2021 www.xiaowangzi.clib All rights reserved.</a>
      <br>
      <a href="#">黔ICP备xxxxxxxx-1号</a>
    </div>
    <!--/.Copyright-->

  </footer>
  {{else}}
  <footer class="page-footer text-center font-small mdb-color darken-2 mt-4 wow fadeIn">
    <!--Call to action-->
    <div class="pt-4">
      <a class="btn btn-outline-white" href="#" role="button">关于我
        <i class="fa  fa-user-secret ml-2"></i>
      </a>
      <a class="btn btn-outline-white" href="#" role="button">
        联系我
        <i class="fa  fa-envelope-square ml-2"></i>
      </a>
    </div>
    <!--/.Call to action-->
    <hr class="my-4">
    <!--Copyright-->
    <div class="footer-copyright py-3">
      <a href="#">Copyright &copy; 2021 www.xiaowangzi.clib All rights reserved.</a>
      <br>
      <a href="#">黔ICP备xxxxxxxx-1号</a>
    </div>
    <!--/.Copyright-->

  </footer>
  {{/if}}

  <!--/.Footer-->

  <!-- SCRIPTS -->
  <!-- JQuery -->
  <script type="text/javascript" src="/home/js/jquery-3.4.1.min.js"></script>
  <!-- Bootstrap tooltips -->
  <script type="text/javascript" src="/home/js/popper.min.js"></script>
  <!-- Bootstrap core JavaScript -->
  <script type="text/javascript" src="/home/js/bootstrap.min.js"></script>
  <!-- MDB core JavaScript -->
  <script type="text/javascript" src="/home/js/mdb.min.js"></script>
  <!-- Initializations -->
  <script type="text/javascript">
    // Animations initialization
    new WOW().init();

  </script>
</body>

</html>
